<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>修改回复内容</title>
<link rel="stylesheet" href="layui/css/layui.css" />
</head>
<body>
	<form class="layui-form"  style="margin-top: 20px;">
	<div class="layui-form-item">
			<label class="layui-form-label">ID</label>
			<div class="layui-input-inline">
				<input type="text" name="message_id" id="message_id" required
					lay-verify="required" class="layui-input" readonly="true">
			</div>
		</div>
	<div class="layui-form-item">
			<label class="layui-form-label">用户ID</label>
			<div class="layui-input-inline">
				<input type="text" name="u_id" id="u_id" required
					lay-verify="required" class="layui-input" readonly="true">
			</div>
		</div>
	<div class="layui-form-item">
			<label class="layui-form-label">留言内容</label>
			<div class="layui-input-inline">
				<input type="text" name="message_contents" id="message_contents" required
					lay-verify="required" class="layui-input" readonly="true">
			</div>
		</div>
	<div class="layui-form-item">
			<label class="layui-form-label">留言时间</label>
			<div class="layui-input-inline">
				<input type="text" name="message_time" id="message_time" required
					lay-verify="required" class="layui-input" readonly="true">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">回复内容</label>
			<div class="layui-input-inline">
				<input type="text" name="message_replycontents" id="message_replycontents" required
					lay-verify="required" class="layui-input" >
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">回复时间</label>
			<div class="layui-input-inline">
				<input type="text" name="message_replytime" id="message_replytime" required
					lay-verify="required" class="layui-input" >
			</div>
		</div>
		<div class="layui-btn-container" style="text-align: center;">
			<button class="layui-btn" lay-submit="" lay-filter="userEdit">回复</button>
		</div>
	</form>
	<script type="text/javascript" src="layui/layui.js"></script>
	<script>
		layui.use('form', function() {
			var form = layui.form;
			var $ = layui.jquery;
			//监听提交
			form.on('submit(userEdit)', function(data) {
				var d = data.field;
				d.method = "update";
				console.log(d);
				var url = '/wk1un2_electricity_digital/Backstage/updateMessage';
				$.post(url, d, function(data) {
					if (data.count > 0) {
						console.log('修改成功');
						var index = parent.layer.getFrameIndex(window.name);
						parent.layer.close(index);
					}
				}, "json");
				return false;
			});
		});
	</script>


</body>
</html>